FROM java:latest
RUN mkdir -p /data/demo-service
COPY ./target/classes /data/demo-service/classes
COPY ./target/dependency /data/demo-service/dependencies
#RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
#  && echo 'Asia/Shanghai' >/etc/timezone \
WORKDIR /data/demo-service
EXPOSE 8080:8080 5005:5005
VOLUME /tmp /data
ENV JAVA_OPTS="-server -Xms1024M -Xmx1024M -Xss512k -XX:PermSize=256M"
#ENTRYPOINT ["java","-Duser.timezone=GMT+08","-cp","/data/demo-service/classes:/data/demo-service/dependencies/*","com.example.DemoApplication"]
ENTRYPOINT ["java","-cp","/data/demo-service/classes:/data/demo-service/dependencies/*","com.example.DemoApplication"]